Optimal. Leaf size=143 \[ -\frac {a \sin (c+d x) \sec ^{m-1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right )}{d (1-m) \sqrt {\sin ^2(c+d x)}}-\frac {b \sin (c+d x) \sec ^{m-2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2-m}{2};\frac {4-m}{2};\cos ^2(c+d x)\right )}{d (2-m) \sqrt {\sin ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3238, 3787, 3772, 2643} \[ -\frac {a \sin (c+d x) \sec ^{m-1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right )}{d (1-m) \sqrt {\sin ^2(c+d x)}}-\frac {b \sin (c+d x) \sec ^{m-2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2-m}{2};\frac {4-m}{2};\cos ^2(c+d x)\right )}{d (2-m) \sqrt {\sin ^2(c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 3238
Rule 3772
Rule 3787
Rubi steps
\begin {align*} \int (a+b \cos (c+d x)) \sec ^m(c+d x) \, dx &=\int \sec ^{-1+m}(c+d x) (b+a \sec (c+d x)) \, dx\\ &=a \int \sec ^m(c+d x) \, dx+b \int \sec ^{-1+m}(c+d x) \, dx\\ &=\left (a \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{-m}(c+d x) \, dx+\left (b \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{1-m}(c+d x) \, dx\\ &=-\frac {b \, _2F_1\left (\frac {1}{2},\frac {2-m}{2};\frac {4-m}{2};\cos ^2(c+d x)\right ) \sec ^{-2+m}(c+d x) \sin (c+d x)}{d (2-m) \sqrt {\sin ^2(c+d x)}}-\frac {a \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (1-m) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 107, normalized size = 0.75 \[ \frac {\sqrt {-\tan ^2(c+d x)} \csc (c+d x) \sec ^{m-1}(c+d x) \left (a (m-1) \, _2F_1\left (\frac {1}{2},\frac {m}{2};\frac {m+2}{2};\sec ^2(c+d x)\right )+b m \cos (c+d x) \, _2F_1\left (\frac {1}{2},\frac {m-1}{2};\frac {m+1}{2};\sec ^2(c+d x)\right )\right )}{d (m-1) m} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.75, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.10, size = 0, normalized size = 0.00 \[ \int \left (a +b \cos \left (d x +c \right )\right ) \left (\sec ^{m}\left (d x +c \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m\,\left (a+b\,\cos \left (c+d\,x\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \cos {\left (c + d x \right )}\right ) \sec ^{m}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________